package guoanmaker.operator.business.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;


import guoanmaker.operator.business.model.PersonalAddress;

public interface PersonalAddressRepository extends JpaRepository<PersonalAddress, String>, JpaSpecificationExecutor<PersonalAddress>{
	@Query("select u from PersonalAddress u  left join fetch u.user r  where r.id=:id and u.isdefault=1 ")
	PersonalAddress findByCode(@Param("id") String id);
}
